<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/pintuer.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/admin.css">
<script src="${pageContext.request.contextPath}/static/js/jquery.js"></script>
<script src="${pageContext.request.contextPath}/static/js/pintuer.js"></script>

<link rel="stylesheet" href="${pageContext.request.contextPath}/static/jquery-ui-1.12.1.custom/jquery-ui.css">
<!-- <link rel="stylesheet" href="/resources/demos/style.css"> -->
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="${pageContext.request.contextPath}/static/jquery-ui-1.12.1.custom/jquery-ui.js"></script>

<script language="javascript" src="${pageContext.request.contextPath}/static/Lodop6/LodopFuncs.js"></script>  
<script src="${pageContext.request.contextPath}/static/jquery/jquery-1.8.3.min.js"></script>  
<script type="text/javascript">
  
//定义全局变量
var LODOP;
//打印
function toPrint() {
	//识别各种浏览器的实现原理是根据navigator.userAgent返回值识别,如果为chrome浏览器
	if (navigator.userAgent.indexOf('Chrome')>=0){
		var headstr = "<html><head></head><body>";  
		var footstr = "</body>";  
		//获得 print_div   里的所有 html 数据(把要打印的数据嵌套在 一个 div 里，获得 div)
		var printData = document.getElementById("tRequest").innerHTML;
		//获取当前页面的html
		var oldstr = document.body.innerHTML; 
		//把 headstr+printData+footstr 里的数据 复制给 body 的 html 数据 ，相当于重置了 整个页面的 内容
		document.body.innerHTML = headstr+printData+footstr; 
		//使用方法为 window.print() 打印页面上局部的数据 
		window.print(); 
		document.body.innerHTML = oldstr;  
	}else{
		 if(!LODOP){
			//getLodop的任务是判断浏览器的类型并决定采用哪个对象实例，并检测控件是否安装、是否最新版本、并引导安装或升级 
			LODOP=getLodop();
			
		}
		if(LODOP){
			var headstr = "<html><head></head><body>";  
			var footstr = "</body>";  
			var printData = document.getElementById("tRequest").innerHTML;
			var oldstr = document.body.innerHTML;  
			var data = headstr+printData+footstr;  
			LODOP.ADD_PRINT_HTM(20,32,"92%","94%",data);
			LODOP.SET_PRINT_STYLEA(0,"HOrient",3);
			LODOP.SET_PRINT_STYLEA(0,"VOrient",3);
			LODOP.PREVIEW();
		} 
	}
}
//取消
function cancel(){
	window.history.back();
}
 	</script>
</head>
<body>

<div class="panel admin-panel ">
  <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>支付报销金额</strong></div>
  <div class="body-content">
    <form method="post" class="form-x" action="${pageContext.request.contextPath}/sys/expense.do?method=defineExpnseMoney">
    
      <input type="hidden"  name="thisMoeny" value="${thisMoeny}"/>
      <input type="hidden"  name="ticket" value="${ticket}"/>
      <input type="hidden"  name="illName" value="${illName}"/>
      <div class="form-group">
        <div class="label">
          <label>姓名</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="name" value="${name}" readonly/>
          <div class="tips"></div>
        </div>
      </div>
      
      <div class="form-group">
        <div class="label">
          <label>身份证号</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="idcardNumber" value="${idcardNumber}" readonly/>
          <div class="tips"></div>
        </div>
      </div>
     
      <div class="form-group">
        <div class="label">
          <label>农合证号</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="farmingcardCode" value="${farmingcardCode}" readonly/>
          <div class="tips"></div>
        </div>
      </div>
      
      <div class="form-group">
        <div class="label">
          <label>累计报销金额</label>
        </div>
        <div class="field">
        	<span style="font-size: 15px;color: #d20125;"class="current" id="sumMoney">${alreadyMoeny}元</span>
          
          <div class="tips"></div>
        </div>
      </div>
      
      <div class="form-group">
        <div class="label">
          <label>剩余可报销金额</label>
        </div>
        <div class="field">
        	<span style="font-size:15px;color: #d20125;"class="current" id="sumMoney">${surplusMoney}元</span>
          
          <div class="tips"></div>
        </div>
      </div>
      
      <div class="form-group">
        <div class="label">
          <label>所需支付金额</label>
        </div>
        <div class="field">
        	<span style="font-size: 22px;color: #d20125;"class="current" id="sumMoney">${afterMoeny}元</span>
          <input type="hidden" class="input w50" name="afterMoeny" value="${afterMoeny}" />
          <div class="tips"></div>
        </div>
      </div>
      
      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
         <a  class="button border-red" href="expense.do?method=openCheckInfoPage" onclick="return del1()">取消</a>
         
          
        </div>
        
      </div>
    </form>
    
  </div>
</div>
<div class="panel admin-panel ">
  <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>发票打印</strong></div>
  <div class="body-content">
    <!-- 以下为具体需要打印的内容 -->  
    <div id ="tRequest" style="">  
      <table style="border-collapse:collapse;width:700px;">  
            
          
        <tr>  
            <td style="width:30px;text-align:center;vertical-align:middle;border: 1px solid #000;" rowspan="4">机构信息</td>  
          
            <td colspan="2" style="border: 1px solid #000;height:25px;width:150px;">中文名称</td>  
            <td colspan="4" style="border: 1px solid #000;">广西梧州XXX农合机构</td>  
        </tr>  
        <tr>  
            <td colspan="2" style="border: 1px solid #000;height:25px;">地址</td>  
            <td colspan="4" style="border: 1px solid #000;">广西梧州市万秀区梧州学院</td>  
        </tr>  
        <tr>  
            <td colspan="2" style="border: 1px solid #000;height:25px;">联系电话</td>  
            <td colspan="4" style="border: 1px solid #000;">0774123456</td>  
        </tr>  
        <tr>  
            <td colspan="2" style="border: 1px solid #000;height:25px;">发票号</td>  
            <td colspan="4" style="border: 1px solid #000;"> ${ticket}</td>  
        </tr>  
        
        
        
        <tr>  
            <td style="width:30px;text-align:center;vertical-align:middle;border: 1px solid #000;" rowspan="2">发票详情</td>  
          	<td colspan="2" style="border: 1px solid #000;height:25px;">缴费人姓名</td>  
            <td colspan="1" style="border: 1px solid #000;">医疗费</td>
            <td colspan="1" style="border: 1px solid #000;">本次报销金额</td>
            <td colspan="2" style="border: 1px solid #000;">实际医疗费</td>
            
        </tr>
         
        <tr>  
            <td colspan="2" style="border: 1px solid #000;height:25px;">${name}</td>  
            <td colspan="1" style="border: 1px solid #000;">${medicalPays}元</td>
            <td colspan="1" style="border: 1px solid #000;">${thisMoeny}元</td>
            <td colspan="2" style="border: 1px solid #000;">${afterMoeny}元</td>
        </tr>  
       
        
       
      
        <tr>  
            <td style="width:30px;text-align:center;vertical-align:middle;border: 1px solid #000;"></td>  
          
            <td colspan="2" style="border: 1px solid #000;height:25px;">  
                操作员：${sessionScope.sysUser.username }  
            </td>  
          <td colspan="4" style="border: 1px solid #000;">打印时间：${date }</td>
        </tr>  
        <tr>  
            <td style="width:30px;text-align:center;vertical-align:middle;border: 1px solid #000;">备注</td>  
          
            <td colspan="6" style="border: 1px solid #000;">  
                如您办理电子钥匙续费，请在此栏注明您所持有的电子钥匙的DN号码：<br><br>  
            </td>  
        </tr>  
      </table>
      
    </div> 
    <div class="btnc">  <a id="btn_print" class="button bg-main icon-check-square-o" data-options="plain:true,iconCls:'icon-print'" onclick="javascript:toPrint();">打印</a></div>
     
  </div>
</div>
<script type="text/javascript">
function del1() {
    if(confirm("取消将会退出当前页面，确实要取消吗？")){
    	
    }else {
        return false;
    }

}
</script>
</body>
</html>